<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%
String path = request.getContextPath();
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<link rel="stylesheet" type="text/css" href="<%=path %>/static/css/css.css?1" />
<link rel="stylesheet" type="text/css" href="<%=path %>/static/jquery-ui/jquery-ui.min.css" />
<script type="text/javascript" src="<%=path %>/static/js/json2.js"></script>
<script type="text/javascript" src="<%=path %>/static/js/jquery.js"></script>
<script type="text/javascript" src="<%=path %>/static/jquery-ui/jquery-ui.min.js"></script>
<script type="text/javascript" src="<%=path %>/static/layer/layer.js"></script>
<script type="text/javascript" src="<%=path %>/static/utf8-jsp/ueditor.config.js"></script>
<script type="text/javascript" src="<%=path %>/static/utf8-jsp/ueditor.all.js"></script>
<script type="text/javascript" src="<%=path %>/static/js/gridview.js?v=1"></script>
<script type="text/javascript" src="<%=path %>/static/js/formview.js?v=1"></script>
<script type="text/javascript" src="<%=path %>/static/js/tool.js"></script>
<script type="text/javascript" src="<%=path %>/static/js/validate.js"></script>

<SCRIPT type="text/javascript">
$.ajaxSetup({
  async: false
  });
    <!--
    genDicJs(['006','007','008']);
    var formSetting = {
    		po:'QhToolCash',
    		title:"工具提现编辑",
    		formid:"formedit",
    		hiddens:["id","createUser","createDateTime","modifyUser","modifyDateTime","state"],
    	fields:[
    	     [
                {tdwidth:100,title:"标题",type:"text",name:"title",width:150,datatype:"Require",msg:"请输入标题！"}
             ],
             [
             	{title:"任务类型",type:"select",name:"taskType",width:"154",datatype:"Require",msg:"请选择任务类型！"}
             ],
    	     [
				{title:"类别",type:"select",name:"type",width:"154",datatype:"Require",msg:"请选择类别！"}
    		 ],
    		 [
             	{title:"奖励类别",type:"select",name:"rewardType",width:"154",datatype:"Require",msg:"请选择奖励类别！"}
             ],
             [
                {title:"数量",type:"text",name:"number",width:150,datatype:"Number",msg:"请输入格式正确的数量！"}
             ],
             [
                {title:"开始时间",type:"datetime",name:"startDate",width:150,datatype:"Require",msg:"请选择开始时间！"}
             ],
    		 [
    		    {title:"结束时间",type:"datetime",name:"endDate",width:"150",datatype:"Require",msg:"请选择结束时间！"}
    		 ],
    		 [
                {title:"提现额度（元）",type:"text",name:"cashMoney",width:150,datatype:"Money",msg:"请输入格式正确的提现额度！"}
             ],
             [
                {title:"有效期（天）",type:"text",name:"validTerm",width:150,datatype:"Number",msg:"请输入格式正确的有效期！"}
             ]
             ],
		toolbar:{align:'right',buttons:[
		                 			  {
		                 			    	 id:'save',
		                 			    	 title:'保存',
		                 			    	 handlers:{
		                 			    		 click: function(){
		                 			    			 if(!Validator.Validate(document.getElementById('formedit'),0)){
		                 			    			    return;
		                 			    			 }

		                 			    			 form.save(function(ret) {
                                                         if (ret == -1) {
                                                             layer.alert("数据保存失败，请重试！");
                                                         } else {
                                                             layer.msg("数据已保存！");
                                                         }
                                                     });
		                 			    		 }
		                 			    	 }
		                 			     }
		                 			 ]}
    }

	var form;
    $(document).ready(function(){
    	form = new FormView("formview",formSetting);
    	form.init();

    	var tasktypehtml="<option value=''>==请选择==</option>";
            tasktypehtml+="<option value='限时任务'>限时任务</option>";
            tasktypehtml+="<option value='长期任务'>长期任务</option>";
            tasktypehtml+="<option value='限时活动'>限时活动</option>";
        $("select[name=taskType]").html(tasktypehtml);

    	var typehtml="<option value=''>==请选择==</option>";
            typehtml+="<option value='分享'>分享</option>";
            typehtml+="<option value='阅读'>阅读</option>";
            typehtml+="<option value='邀请'>邀请</option>";
        $("select[name=type]").html(typehtml);

        var rewardtypehtml="<option value=''>==请选择==</option>";
            rewardtypehtml+="<option value='金额'>金额</option>";
            rewardtypehtml+="<option value='提现工具'>提现工具</option>";
        $("select[name=rewardType]").html(rewardtypehtml);

    	var id='${param.id}';
    	if(id!=null&&id!=""){
    	   form.loadData(id, "QhTask");
    	}

		ajustHeight();
    });

    var $$ = function(func){
        if (document.addEventListener) {
            window.addEventListener("load", func, false);
        }
        else if (document.attachEvent) {
            window.attachEvent("onload", func);
        }
    }
    $$(function(){

    });
    //-->
</SCRIPT>
</head>

<body>
<div id="formview0" class="rbox1"></div>
<div id="formview" class="rbox1"></div>
<div id="list" class="rbox2"></div>

<script type="text/javascript" src="<%=path %>/static/js/underscore.js"></script>
<script type='text/javascript' src='<%=path %>/static/My97DatePicker/WdatePicker.js'></script>
<script type='text/javascript' src='<%=path %>/dwr/engine.js'></script>
<script type='text/javascript' src='<%=path %>/dwr/util.js'></script>
<script type='text/javascript' src='<%=path %>/dwr/interface/BaseDwr.js'></script>

</body>
</html>